function createDeployNet(net_file, deploy_file)

net_content = fileread(net_file);

% input_layer = sprintf([
%     'layer {\n'...
%     '\tname: "data"\n'...
%     '\ttype: "Input"\n'...
%     '\ttop: "data"\n'...
%     '\tinput_param { shape: { dim: 1 dim: 1 dim: 256 dim: 256 } }\n'...
%     '}'
%     ]);

input_layer = sprintf([
    'input: "data"\n'...
    'input_dim: 1\n'...
    'input_dim: 1\n'...
    'input_dim: 256\n'...
    'input_dim: 256\n'...
    ]);

deploy_net = mycaffe.net.rmLayer(net_content, 'data');
deploy_net = mycaffe.net.rmLayer(deploy_net, 'loss');

[ii, jj] = regexp(deploy_net, 'name\s*:\s*"\S+"');
deploy_net = sprintf([deploy_net(ii(1) : jj(1)) '\n\n' input_layer '\n\n' strtrim(deploy_net(jj(1)+1 : end))]);

fid = fopen(deploy_file, 'w');
fwrite(fid, deploy_net);
fclose(fid);
